package com.example.task.scheduler;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/9/21 10:10
 */
@Component
@Slf4j
public class Scheduler2 {
    private int count=0;

    @Scheduled(cron="*/6 * * * * ?")
    private void process(){
       log.info("this is scheduler task runing  count:{}",(count++));
    }
}
